package com.augurit.common.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * WEB服务器外网地址转换Entity类
 * 
 */
@Entity
@Table(name = "AT_SERVER_CONVERT")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class AtServerConvert {

	//属性
	private Long convertId;			//主键ID
	private String convertName;		//外网地址转换策略名称
	private Long servId;			//WEB服务器ID
	private String isActive;		//是否启用
	private String inServerIp;		//内网服务器IP
	private String inServerPort;	//内网服务器端口
	private String outServerIp;		//外网服务器IP
	private String outServerPort;	//外网服务器端口
	private String remark;			//备注

	
	@Id
    @SequenceGenerator(name="SEQ_AT_SERVER_CONVERT", sequenceName="SEQ_AT_SERVER_CONVERT", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_AT_SERVER_CONVERT")
	public Long getConvertId() {
		return convertId;
	}

	public void setConvertId(Long convertId) {
		this.convertId = convertId;
	}

	public String getConvertName() {
		return convertName;
	}

	public void setConvertName(String convertName) {
		this.convertName = convertName;
	}

	public Long getServId() {
		return servId;
	}

	public void setServId(Long servId) {
		this.servId = servId;
	}

	public String getIsActive() {
		return isActive;
	}

	public void setIsActive(String isActive) {
		this.isActive = isActive;
	}

	public String getInServerIp() {
		return inServerIp;
	}

	public void setInServerIp(String inServerIp) {
		this.inServerIp = inServerIp;
	}

	public String getInServerPort() {
		return inServerPort;
	}

	public void setInServerPort(String inServerPort) {
		this.inServerPort = inServerPort;
	}

	public String getOutServerIp() {
		return outServerIp;
	}

	public void setOutServerIp(String outServerIp) {
		this.outServerIp = outServerIp;
	}

	public String getOutServerPort() {
		return outServerPort;
	}

	public void setOutServerPort(String outServerPort) {
		this.outServerPort = outServerPort;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}